UAVs may be used for commercial and recreational purposes. A UAV may include ultrasonic functionality for detecting objects, such as to determine a position of the UAV relative to the object, a distance between the UAV and the object, or the like. Information about detected objects can be useful for other aspects of the UAV. For example, in the context of vision-based navigation, information about the distance between the UAV and a detected object can be used to supplement successive images indicating visual distinctions between observed objects. In another example, in the context of video processing, information about the position of the UAV relative to an object can be successively used to indicate motion. The ultrasonic functionality of a UAV relies upon a transducer transmitting ultrasonic signals using appropriate gain, power, and other values.